package com.hwadee.teachingprocessmanagementsystem.controller.base;

import com.hwadee.teachingprocessmanagementsystem.dto.DepartmentDto;
import com.hwadee.teachingprocessmanagementsystem.entity.Department;
import com.hwadee.teachingprocessmanagementsystem.service.base.DepartmentService;
import com.hwadee.teachingprocessmanagementsystem.util.result.DataResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import jakarta.annotation.Resource;

/**
 * 系部表(Department)表控制层
 *
 * @author makejava
 * @since 2024-07-11 14:20:03
 */
@RestController
@RequestMapping("department")
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;
    @RequestMapping("departments")
    public DataResult getDepartments() {
        DepartmentDto departmentDto = this.departmentService.getDepartmentDto();
        return DataResult.successByData(departmentDto);
    }
}

